package com.sn.system.tangs.tag;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.components.Component;
import org.apache.struts2.views.jsp.ui.AbstractUITag;

import com.opensymphony.xwork2.util.ValueStack;

public class MsgTag extends AbstractUITag{
	
	private String id;
	
	private String msg;
	
	private String okFunction;
	
	private String focusOn;
	
	private String value;
	
	private String title;
	


	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getOkFunction() {
		return okFunction;
	}

	public void setOkFunction(String okFunction) {
		this.okFunction = okFunction;
	}

	public String getFocusOn() {
		return focusOn;
	}

	public void setFocusOn(String focusOn) {
		this.focusOn = focusOn;
	}

	
    public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	/**
     * パラメータを取りする
     */
    protected void populateParams() {
        super.populateParams();

        Msg msgs = (Msg)component;
        msgs.setFocusOn(focusOn);
        msgs.setOkFunction(okFunction);
        msgs.setMsg(msg);
        msgs.setId(id);
        msgs.setValue(value);

    }

	public Component getBean(ValueStack stack, HttpServletRequest request,
			HttpServletResponse response) {
		return new Msg(stack, request, response);
	}
}
